#include <stdio.h>
int main(int argc, char const *argv[])
{
    int a[10][10] = {0};
    for (int i = 0; i < 10; i++)
    {
        for (int j = 0; j < 10-1-i; j++)
        {
            printf("  ");
        }
        
        for (int j = 0; j <= i; j++)
        {
            // printf("* ");
            if (j == 0)
            {
                a[i][0] = 1;
            }
            if (i == j)
            {
                a[i][j] = 1;
            }
            if ((i > 1) && (j > 0))
            {
                a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
            }
            printf("%3d ", a[i][j]);
        }
        printf("\n");
    }
    return 0;
}
